#!/bin/bash


sleep 1
#sudo chmod 777 /dev/ttyTHS0

gnome-terminal --tab -t "1_mavros" -- bash -c "ros2 launch mavros px4.launch;"


sleep 8


gnome-terminal --tab -t "2_fcu_comm"  -- bash -c "ros2 launch fcu_comm fcu_comm.launch;"


sleep 5


gnome-terminal --tab -t "3_Cluster_formation_control"  -- bash -c "ros2 run new_cluster Cluster_formation_control_node_new;"


sleep 5

#gnome-terminal --tab -t "4_DDS2ROS"  -- bash -c "cd ~/ros2_ws/install/dds2ros; ./DDS2ROS;"# sleep infinity;

gnome-terminal --tab -t "4_DDS2ROS"  -- bash -c "cd ~/build/DDS2ROS; ./DDS2ROS-tprold;"

sleep 5

gnome-terminal --tab -t "5_behavior-node"  -- bash -c "cd ~/ros2_ws; ros2 run behavior-process behavior-node;"

#gnome-terminal --tab -t "6_xe_thru"  -- bash -c "ros2 launch xe_thru x4m300.launch.xml;"

gnome-terminal --tab -t "7_usb_cam"  -- bash -c "ros2 launch usb_cam_pkg mt2303u.launch"

gnome-terminal --tab -t "8_videodistribution"  -- bash -c "ros2 launch video_distribution video_distribution.launch.py;"
sleep 1

#sleep 5

#gnome-terminal -- bash -c "source /opt/ros/foxy/setup.bash; source ~/ros2_ws/install/setup.bash;  bash $basepath/check_restart.sh;"





